#pragma once
#include <type_traits>
#include <iostream>
using std::ostream;

#include "../public/constants.hpp"
#include "../public/exception.hpp"

#include "../container/hashtable.hpp"

namespace bla {
	template<typename _type>
	class unordered_set {
	public:
		//using define
		using iterator = hashtableIterator<_type>;
		using sizeType = _containerSizeType;
		using differenceType = _containerSizeType;
		using valueType = _type;
		using pointerType = _type * ;
		using referenceType = _type & ;
	private:
		hashtable<valueType, valueType, _defhashFunctor<valueType>,
			_identitySingleFunctor<valueType>, _identitySameTypeCompareFunctor<valueType>> _ht;
	public:
		inline sizeType size() { return _ht.size(); };
		inline sizeType bucketSize() { return _ht.bucketSize(); };
		inline const sizeType size() const { return _ht.size(); };
		inline const sizeType bucketSize() const { return _ht.bucketSize(); };
		bool find(valueType v) { 
			return _ht.find(v); 
		}
		void insert(valueType v) { 
			return _ht.insert(v); 
		}
		void erase(valueType v) {
			_ht.erase(v);
		}
		template<typename _type>
		friend ostream& operator<< (ostream &os, const unordered_set<_type>& li);
	};
	template<typename _type>
	ostream & operator<<(ostream & os, const unordered_set<_type>& li)
	{
		os << li._ht;
		return os;
	}
}
